Use libgit2 for driving git instead of the CLI
authorAlex Crichton <alex@alexcrichton.com>
Wed, 6 Aug 2014 15:01:17 +0000 (08:01 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Sat, 16 Aug 2014 22:54:07 +0000 (15:54 -0700)
commit230dbf6a59daeddfd016fdaae65155be1942665d
treec61fe37fd7aa9cf75ebf8f8430a6e811466fbf67
parent3db8a3b1dfb8a898862814a40a5dd0d36fce3feb
Use libgit2 for driving git instead of the CLI

In general relying on external programs is dicey and tricky as they're very
different across systems in both how they're used as well as what versions
you'll find. Instead of binding to the least common denominator of CLI, we can
code against an exact version of libgit2.

This introduces a build-time dependency on cmake which libgit2 requires to build
itself, which is unfortunate, but thankfully it's only a build time dep. The
build process for libgit2 also automatically detects as many system libraries as
possible to use (if available), falling back to bundled versions if not
available. I have currently not figured how to control this, so the link-config
package is used to build libgit2 which requires that pkg-config be installed to
build cargo as well.

Closes #138
Cargo.lock
Cargo.toml
configure
src/cargo/core/resolver.rs
src/cargo/core/source.rs
src/cargo/lib.rs
src/cargo/ops/cargo_new.rs
src/cargo/sources/git/source.rs
src/cargo/sources/git/utils.rs
src/cargo/util/errors.rs
src/cargo/util/to_url.rs